<template>
<div>
    <el-menu router :default-active="this.$route.path" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" style="overflow:auto;" :style="prop_headzHeight">
        <el-submenu index="1">
            <template slot="title">
                <i class="el-icon-location"></i>
                <span>文章</span>
            </template>
            <el-menu-item  index="/adm/insertfilm">录入</el-menu-item>
            <el-menu-item index="/adm/filmlist">列表</el-menu-item>
            <el-menu-item index="/adm/articallist">文列</el-menu-item>
      
        </el-submenu>

        <el-submenu index="2">
            <template slot="title">
                <i class="el-icon-setting"></i>
                <span>营销</span>
            </template>
            <el-menu-item index="/indexbanner">首页轮播</el-menu-item>
        </el-submenu>

        <el-submenu index="3">
            <template slot="title">
                <i class="el-icon-location"></i>
                <span>个人设置</span>
            </template>
            <el-menu-item index="/adm/password">修改密码</el-menu-item>
        </el-submenu>

        <el-submenu index="4">
            <template slot="title">
                <i class="el-icon-setting"></i>
                <span>用户管理</span>
            </template>
            <el-menu-item index="/adm/userlist">用户列表</el-menu-item>
        </el-submenu>

                <el-submenu index="5">
            <template slot="title">
                <i class="el-icon-setting"></i>
                <span>系统设置</span>
            </template>
           <el-menu-item index="/adm/region">区域</el-menu-item>
        </el-submenu>



    </el-menu>
</div>
</template>

<script>
export default {
    props: ["headzHeight"],
    data() {
        return {
menuPath:[
[
    "alevel":{name:"单个",path:"/adm/as"},
],
[
        {
        "alevel":{name:"文章",path:""},
        "child":[
            {
            name:"录入",
            patch:'/adm/insertfilm'
        },
        {
            name:"列表",
            patch:'/adm/filmlist'
        },
        {
            name:"文列",
            patch:'/adm/articallist'
        }
        ]
    }
],
[
            {
        "alevel":{name:"营销",path:""},
        "child":[
            {
            name:"首页轮播",
            patch:'/adm/insertfilm'
        }
        ]
    }
],
[
            {
        "alevel":{name:"个人设置",path:""},
        "child":[
            {
            name:"修改密码",
            patch:'/adm/password'
        }
        ]
    }
],
[
            {
        "alevel":{name:"用户管理",path:""},
        "child":[
            {
            name:"用户列表",
            patch:'/adm/userlist'
        }
        ]
    }
],
[
            {
        "alevel":{name:"系统设置",path:""},
        "child":[
            {
            name:"区域",
            patch:'/adm/region'
        }
        ]
    }
]
]
        }
    },
    mounted() {

    },
    computed: {
        prop_headzHeight() {
            var _menuHeight = document.documentElement.clientHeight - this.headzHeight
            return ('height:' + _menuHeight + 'px')
        }
    },

    methods: {
        handleOpen(key, keyPath) {
            //console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            //console.log(key, keyPath);
        }
    }
}
</script>

<style scoped>

</style>
